/**************************************************************************//**
  \file boardstubs.h

  \brief various stubs for BSP_* functions

  \author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2008-2012, Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

******************************************************************************/
#ifndef _BOARDSTUBS_H_
#define _BOARDSTUBS_H_

/******************************************************************************
                    Includes section
******************************************************************************/
#include "leds.h"
#include "lcd.h"
#include "buttons.h"
#include "sliders.h"

/******************************************************************************
                    Defines section
******************************************************************************/
#if APP_INTERFACE == APP_INTERFACE_VCP
  #include <vcpVirtualUsart.h>
#endif

#if APP_INTERFACE == APP_INTERFACE_USBFIFO
  #include <usbFifoUsart.h>
#endif // APP_INTERFACE_USBFIFO

#if APP_INTERFACE == APP_INTERFACE_USART
  #define USART_Open HAL_OpenUsart
  #define USART_Write HAL_WriteUsart
  #define USART_Close HAL_CloseUsart
#elif APP_INTERFACE == APP_INTERFACE_VCP
  #define USART_Open VCP_OpenUsart
  #define USART_Write VCP_WriteUsart
  #define USART_Close VCP_CloseUsart
#elif APP_INTERFACE == APP_INTERFACE_USBFIFO
  #define USART_Open  USBFIFO_OpenUsart
  #define USART_Close USBFIFO_CloseUsart
  #define USART_Write USBFIFO_WriteUsart
#else
  #define USART_Open(d)
  #define USART_Write(d,b,s)
  #define USART_Close(d)
#endif

#endif /* _BOARDSTUBS_H_ */
